package cn.com.captureNetPacket.model;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import cn.com.captureNetPacket.CorePcapPacketHandler;
import org.jnetpcap.Pcap;

import lombok.Data;
@Data
public class NetworkCardInfo {
		 private Pcap pcap;
         private String name;
         private String description;
         private int flags;
         private String hardwareAddress;
         private String netmask;
         private List<String> ipv4=new ArrayList<String>();
         private List<String> ipv4Mask=new ArrayList<String>();
         private List<String> ipv6=new ArrayList<String>();
         private List<String> ipv6Mask=new ArrayList<String>();
    /**
     * 处理当前网卡包的对象
     */
     private CorePcapPacketHandler pcapPacketHandler ;


     private LocalDateTime lastRecivePacketTime=LocalDateTime.now();



    /**
     *   抓包状态
     */
    public StaticVar.NETWORKCARD_STATUS networkCaptureStaus = StaticVar.NETWORKCARD_STATUS.CLOSED;


    /**
     * 网卡是否开启抓包
     */
    public boolean startCapture=true;
    /**
     * 处理数据的线程
     */
    Thread loadPacketThread;
    public boolean loadPacketThreadStart=true;
//    public long loadPacketThreadCount=0;
    /**
     *   重新 开启抓包 的次数，无法收包，重新 开启抓包的计数
     */
      public int reCapCount=0;
    public String lastError="";


    public boolean needReinitThread=false;
}
